package com.zx.sp_mybatisplus_smbms.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zx.sp_mybatisplus_smbms.pojo.SmbmsUser;
import com.zx.sp_mybatisplus_smbms.service.SmbmsUserService;
import com.zx.sp_mybatisplus_smbms.mapper.SmbmsUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author lenovo
* @description 针对表【smbms_user】的数据库操作Service实现
* @createDate 2021-12-28 16:27:34
*/
@Service
public class SmbmsUserServiceImpl extends ServiceImpl<SmbmsUserMapper, SmbmsUser>
    implements SmbmsUserService{
    @Autowired
private SmbmsUserMapper userMapper;
    @Override
    public List<SmbmsUser> findAllByUsers() {
        return userMapper.findAllByUsers();
    }

    @Override
    public boolean addUsers(SmbmsUser user) {
        return userMapper.addUsers(user);
    }

    @Override
    public boolean updateUsers(SmbmsUser user) {
        return userMapper.updateUsers(user);
    }

    @Override
    public boolean delUsers(Long uid) {
        return userMapper.delUsers(uid);
    }

    @Override
    public SmbmsUser findUsersById(Long uid) {
        return userMapper.findUsersById(uid);
    }

    @Override
    public SmbmsUser login(String uname, String pwd) {
        return userMapper.login(uname, pwd);
    }

    @Override
    public SmbmsUser findUserByCode(String usercode) {
        return userMapper.findUserByCode(usercode);
    }

    @Override
    public List<SmbmsUser> findUserListByCodeAndRole(String usercode, Long userrole) {
        return userMapper.findUserListByCodeAndRole(usercode, userrole);
    }
}




